﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<Model.Models.Empresa>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Create
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

<h2>Cadastrar Empresa</h2>

<script src="<%: Url.Content("~/Scripts/jquery.validate.min.js") %>" type="text/javascript"></script>
<script src="<%: Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js") %>" type="text/javascript"></script>


<% using (Html.BeginForm()) { %>
    <%: Html.ValidationSummary(true) %>
    <fieldset>
        <legend>Empresa</legend>

       <%-- <div class="editor-label">
            <%: Html.LabelFor(model => model.Id_Empresa) %>
        </div>
        <div class="editor-field">
            <%: Html.EditorFor(model => model.Id_Empresa) %>
            <%: Html.ValidationMessageFor(model => model.Id_Empresa) %>
        </div>--%>

        <div class="editor-label">
            <%: Html.LabelFor(model => model.Nome) %>
        </div>
        <div class="editor-field">
            <%: Html.EditorFor(model => model.Nome) %>
            <%: Html.ValidationMessageFor(model => model.Nome) %>
        </div>

        <div class="editor-label">
            <%: Html.LabelFor(model => model.Cnpj) %>
        </div>
        <div class="editor-field">
            <%: Html.EditorFor(model => model.Cnpj) %>
            <%: Html.ValidationMessageFor(model => model.Cnpj) %>
        </div>

        <div class="editor-label">
            <%: Html.LabelFor(model => model.Email) %>
        </div>
        <div class="editor-field">
            <%: Html.EditorFor(model => model.Email) %>
            <%: Html.ValidationMessageFor(model => model.Email) %>
        </div>

        <div class="editor-label">
            <%: Html.LabelFor(model => model.Senha) %>
        </div>
        <div class="editor-field">
            <%: Html.PasswordFor(model => model.Senha) %>
            <%: Html.ValidationMessageFor(model => model.Senha) %>
        </div>

        <div class="editor-label">
            <%: Html.LabelFor(model => model.ConfirmaSenha) %>
        </div>
        <div class="editor-field">
            <%: Html.PasswordFor(model => model.ConfirmaSenha)%>
            <%: Html.ValidationMessageFor(model => model.ConfirmaSenha) %>
        </div>

        <div class="editor-label">
            <%: Html.LabelFor(model => model.Telefone) %>
        </div>
        <div class="editor-field">
            <%: Html.EditorFor(model => model.Telefone) %>
            <%: Html.ValidationMessageFor(model => model.Telefone) %>
        </div>

        <div class="editor-label">
            <%: Html.LabelFor(model => model.RazaoSocial) %>
        </div>
        <div class="editor-field">
            <%: Html.EditorFor(model => model.RazaoSocial) %>
            <%: Html.ValidationMessageFor(model => model.RazaoSocial) %>
        </div>

        <div class="editor-label">
            <%: Html.LabelFor(model => model.Rua) %>
        </div>
        <div class="editor-field">
            <%: Html.EditorFor(model => model.Rua) %>
            <%: Html.ValidationMessageFor(model => model.Rua) %>
        </div>

        <div class="editor-label">
            <%: Html.LabelFor(model => model.Numero) %>
        </div>
        <div class="editor-field">
            <%: Html.EditorFor(model => model.Numero) %>
            <%: Html.ValidationMessageFor(model => model.Numero) %>
        </div>

        <div class="editor-label">
            <%: Html.LabelFor(model => model.Bairro) %>
        </div>
        <div class="editor-field">
            <%: Html.EditorFor(model => model.Bairro) %>
            <%: Html.ValidationMessageFor(model => model.Bairro) %>
        </div>

        <div class="editor-label">
            <%: Html.LabelFor(model => model.Cep) %>
        </div>
        <div class="editor-field">
            <%: Html.EditorFor(model => model.Cep) %>
            <%: Html.ValidationMessageFor(model => model.Cep) %>
        </div>

        <div class="editor-label">
            <%: Html.LabelFor(model => model.Cidade) %>
        </div>
        <div class="editor-field">
            <%: Html.EditorFor(model => model.Cidade) %>
            <%: Html.ValidationMessageFor(model => model.Cidade) %>
        </div>

        <div class="editor-label">
            <%: Html.LabelFor(model => model.Estado) %>
        </div>
        <div class="editor-field">
            <%: Html.DropDownListFor(model => model.Estado, new []{
                        new SelectListItem {Text = "AC",Value="AC"},
                        new SelectListItem {Text = "AL",Value="AL"},
                        new SelectListItem {Text = "AM",Value="AM"},
                        new SelectListItem {Text = "AP",Value="AP"},
                        new SelectListItem {Text = "BA",Value="BA"},
                        new SelectListItem {Text = "CE",Value="CE"},
                        new SelectListItem {Text = "DF",Value="DF"},
                        new SelectListItem {Text = "ES",Value="ES"},
                        new SelectListItem {Text = "GO",Value="GO"},
                        new SelectListItem {Text = "MA",Value="MA"},
                        new SelectListItem {Text = "MG",Value="MG"},
                        new SelectListItem {Text = "MS",Value="MS"},
                        new SelectListItem {Text = "MT",Value="MT"},
                        new SelectListItem {Text = "PA",Value="PA"},
                        new SelectListItem {Text = "PB",Value="PB"},
                        new SelectListItem {Text = "PR",Value="PR"},
                        new SelectListItem {Text = "PE",Value="PE"},
                        new SelectListItem {Text = "PI",Value="PI"},
                        new SelectListItem {Text = "RJ",Value="RJ"},
                        new SelectListItem {Text = "RN",Value="RN"},
                        new SelectListItem {Text = "RS",Value="RS"},
                        new SelectListItem {Text = "RR",Value="RR"},
                        new SelectListItem {Text = "RO",Value="RO"},
                        new SelectListItem {Text = "SC",Value="SC"},
                        new SelectListItem {Text = "SP",Value="SP"},
                        new SelectListItem {Text = "SE",Value="SE",Selected=true},
                        new SelectListItem {Text = "TO",Value="TO"}
                        },null, new {@class="editor-field" })
            
            %>
            <%: Html.ValidationMessageFor(model => model.Estado) %>
        </div>

        <p>
            <input type="submit" value="Cadastrar" />
        </p>
    </fieldset>
<% } %>

<div>
    <%: Html.ActionLink("voltar", "Index") %>

</div>

</asp:Content>
